#include "warnning.h"
Warnning::Warnning()
{
    setupUi(this);
    connect(pushButton,SIGNAL(clicked()),this,SLOT(selectQuit()));
    connect(pushButton_2,SIGNAL(clicked()),this,SLOT(selectCancel()));
}
void Warnning::closeEvent(QCloseEvent *event)
{
    this->hide();
    emit this->cancelButton();
}
void Warnning::selectQuit()
{
    if(this->type==0)
        emit this->quitButton();
    else
        emit this->logoutButton();
    this->hide();
}
void Warnning::selectCancel()
{
    emit this->cancelButton();
    this->hide();
}
